<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>背景图片和位置如何设置</title>
    <style>
        div {
            width: 800px;
            height: 600px;
            background-image: url("img/apple.png");
            background-repeat: no-repeat;
            background-position: center;

        }
        .box {
            background-image: url("img/beauty.jpg");
            background-position-x: 80px;
            background-position-y: 20px;
        }
    </style>
</head>
<body>
<div class="box">

</div>

</body>
</html>